package com.chushouya.product.constants;


import com.general.framework.core.enums.IEnum;

import java.util.Objects;

public enum EvaluateTipTypeEnum implements IEnum<Integer> {


//    问题选项Question
    QUESTION(0, "问题选项"),
//    答案选项Answer
    ANSWER(1, "答案选项");

    ;


    private Integer value;
    private String desc;

    EvaluateTipTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }

    public static String getDesc(Integer value) {
        for (EvaluateTipTypeEnum thisEnum : EvaluateTipTypeEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }
}
